// import Cookies from 'js-cookie';

const app = {
  state: {
    isLoading: false,
    direction: 'forward',
    commonLoading:false,
    theme: 'default',
  },
  mutations: {
    UPDATE_LOADING (state, status) {
      state.isLoading = status
    },
    UPDATE_DIRECTION (state, direction) {
      state.direction = direction
    },
    commonLoading(state,data){
      state.commonLoading = data
    },
  },
  actions: {
    updateDirection({ commit }, payload) {
      commit('UPDATE_DIRECTION', payload.direction)
    },
  }
};

export default app;
